﻿<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="Automator.Windows.AboutWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="About Automator"
    Height="450"
    Width="550"
    ShowInTaskbar="False"
    ResizeMode="NoResize"
    WindowStartupLocation="CenterOwner"
    Background="{x:Static SystemColors.ControlBrush}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="*" />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel
            Orientation="Horizontal"
            Grid.Row="0"
            Height="80"></StackPanel>
        <TabControl
            Grid.Row="1"
            Name="tabControl"
            Focusable="False"
            Margin="4"
            SelectionChanged="tabControl_SelectionChanged">
            <TabItem
                Header="About Automator">
                <Grid
                    Margin="8,0,8,8">
                    <Grid.RowDefinitions>
                        <RowDefinition
                            Height="Auto" />
                        <RowDefinition
                            Height="Auto" />
                        <RowDefinition
                            Height="Auto" />
                        <RowDefinition
                            Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel
                        Grid.Row="0"
                        Orientation="Horizontal">
                        <TextBlock
                            VerticalAlignment="Center"
                            Text="Version" />
                        <TextBox
                            IsReadOnly="True"
                            IsEnabled="False"
                            Name="edtVersion"
                            Margin="4,8,0,8"
                            Padding="0,0,8,0" />
                    </StackPanel>
                    <TextBlock
                        Grid.Row="1"
                        Text="Copyright © Victor Lapin 2011"
                        Margin="0,2,0,2" />
                    <TextBlock
                        Grid.Row="2"
                        Text="Released under the terms of Microsoft Public License (Ms-PL)"
                        Margin="0,2,0,2" />
                    <TextBox
                        Grid.Row="3"
                        Name="edtMisc"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        IsReadOnly="True"
                        IsReadOnlyCaretVisible="False"
                        Margin="0,8,0,0"
                        Padding="4"
                        FontFamily="Consolas" />
                </Grid>
            </TabItem>
            <TabItem
                Header="Version Info">
                <ListView
                    SelectionMode="Single"
                    x:Name="gridVersions">
                    <ListView.View>
                        <GridView>
                            <GridViewColumn
                                Header="Name">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Border
                                            BorderBrush="Gray">
                                            <TextBlock
                                                Padding="4"
                                                VerticalAlignment="Center"
                                                Text="{Binding Path=Name}" />
                                        </Border>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn
                                Header="Version">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock
                                            Padding="4"
                                            VerticalAlignment="Center"
                                            Text="{Binding Path=Version}" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn
                                Header="Path">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock
                                            Padding="4"
                                            VerticalAlignment="Center"
                                            Text="{Binding Path=Path}" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                        </GridView>
                    </ListView.View>
                </ListView>
            </TabItem>
            <TabItem
                Header="Credits">
                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <Grid Margin="8">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <GroupBox Grid.Row="0" Margin="4" Padding="8">
                            <GroupBox.Header>
                                <TextBlock VerticalAlignment="Center" FontWeight="SemiBold" Text="Team" />
                            </GroupBox.Header>
                            <StackPanel Orientation="Vertical">
                                <TextBlock VerticalAlignment="Center" 
                                       Text="Project owner and lead developer: Victor Lapin" Margin="0,0,0,2" />
                                <TextBlock VerticalAlignment="Center" 
                                       Text="Application icon designer: brutalbarbarian" />
                            </StackPanel>
                        </GroupBox>
                        <GroupBox Grid.Row="1" Margin="4" Padding="8">
                            <GroupBox.Header>
                                <TextBlock VerticalAlignment="Center" FontWeight="SemiBold" Text="Integrated Third-party Projects" />
                            </GroupBox.Header>
                            <StackPanel Orientation="Vertical">
                                <TextBlock VerticalAlignment="Center" Text="AvalonDock by Adolfo Marinucci" Margin="0,0,0,2" />
                                <TextBlock VerticalAlignment="Center" Text="Extended WPF Toolkit by Brian Lagunas" Margin="0,0,0,2" />
                                <TextBlock VerticalAlignment="Center" Text="AvalonEdit by Daniel Grunwald" Margin="0,0,0,2" />
                                <TextBlock VerticalAlignment="Center" Text="AvalonWizard by Pavel Fedarovich" />
                            </StackPanel>
                        </GroupBox>
                        <GroupBox Grid.Row="2" Margin="4" Padding="8">
                            <GroupBox.Header>
                                <TextBlock VerticalAlignment="Center" FontWeight="SemiBold" Text="Other Credits" />
                            </GroupBox.Header>
                            <StackPanel Orientation="Vertical">
                                <TextBlock VerticalAlignment="Center"
                                           Text="This software uses encryption algorithms by Martijn Dijksterhuis." Margin="0,0,0,2" />
                                <TextBlock VerticalAlignment="Center"
                                           Text="Menu design concept based on guidelines by Mike Fourie." />
                            </StackPanel>
                        </GroupBox>
                    </Grid>
                </ScrollViewer>
            </TabItem>
        </TabControl>
        <DockPanel
            Grid.Row="2"
            LastChildFill="False">
            <Button
                Name="btnOk"
                Content="OK"
                Padding="24,4,24,4"
                Margin="4"
                IsCancel="True"
                IsDefault="True"
                DockPanel.Dock="Right" />
            <TextBlock
                DockPanel.Dock="Left"
                VerticalAlignment="Center"
                Margin="8">
                <Hyperlink
                    NavigateUri="http://automator.codeplex.com"
                    RequestNavigate="Hyperlink_RequestNavigate">
                    Visit http://automator.codeplex.com
                </Hyperlink>
            </TextBlock>
        </DockPanel>
    </Grid>
</Window>